<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="bolao" />
  <g:set var="entityName" value="${message(code: 'group.label', default: 'Group')}" />
  <title><g:message code="default.list.label" args="[entityName]" /></title>
  </head>
  <body>
    <div class="body">
      <h1><g:message code="default.list.label" args="[entityName]" /></h1>
      <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
      </g:if>
      <div class="list">
        <table  class="table">
          <thead>
            <tr>
              <g:sortableColumn property="name" title="${message(code: 'group.name.label', default: 'Name')}" />
              <g:sortableColumn property="cup" title="${message(code: 'group.cup.label', default: 'Cup')}" />
          </tr>
          </thead>
          <tbody>
          <g:each in="${groups}" status="i" var="group">
            <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
              <td><g:link action="show" id="${group.id}">${fieldValue(bean: group, field: "name")}</g:link></td>
              <td>${group?.cup?.year}</td>
            </tr>
          </g:each>
          </tbody>
        </table>
      </div>
      <div class="paginateButtons">
        <g:paginate total="${groupTotal}" />
      </div>
    </div>
  </body>
</html>